package com.yinian.server.controller;

import com.yinian.common.result.Result;
import com.yinian.pojo.dto.OperaVideoDTO;
import com.yinian.pojo.dto.RadioDTO;
import com.yinian.pojo.vo.OperaVideoVO;
import com.yinian.pojo.vo.RadioVO;
import com.yinian.server.service.OperaService;
import com.yinian.server.service.RadioService;
import io.swagger.annotations.Api;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@Slf4j
@Api(tags = "返回听书音频")
public class RadioController {
    @Autowired
    private RadioService radioService ;
   @PostMapping("/radio")
    public Result<List<RadioVO>> getRadio(@RequestBody RadioDTO radioDTO)
    {
        log.info("返回听书音频");
        return Result.success(radioService.getRadioList(radioDTO));
    }
}
